<?php

use app\assets\ApiAsset;
use app\assets\LayerAsset;
use app\assets\TableAsset;
use app\models\KeyMap;
use app\widgets\ManagerTableOp;
use yii\helpers\Html;
use yii\helpers\Url;

/**
 * @var $this yii\web\View
 * @var $user app\models\User
 * @var $packageList app\models\Package[] 所属代理商的套餐
 * @var $userPackageMap app\models\UserPackage[] 用户自己的套餐
 */

ApiAsset::register($this);
LayerAsset::register($this);
TableAsset::register($this);

$this->title = '用户账单列表';
$this->params['breadcrumbs'][] = '用户管理';
$this->params['breadcrumbs'][] = $this->title;
?>

<table class="table table-striped table-bordered table-hover">
    <thead>
    <tr>
        <th colspan="3">当前用户：<?php echo Html::a(Html::encode($user->username), ['/admin/user/user-view', 'id' => $user->id]);?></th>
    </tr>
    <tr>
        <th>月份</th>
        <th>账单信息</th>
        <th>操作</th>
    </tr>
    </thead>

    <tbody>
    <?php foreach ($userbillList as $month) {?>
        <tr>
            <td class="center"><?php echo Html::encode($month);?></td>
            <td>套餐：移动全国5M(SHG2)  计费数量：1000  金额：100（元）</br>
            套餐：移动全国100M(SHG2)  计费数量：100  金额：10000（元）
            </td>
            <td>    <a href="<?php echo Url::to(['/admin/card/bill', 'search_username' => $user->username, 'search_month' => $month]);?>">查看账单</a>&nbsp&nbsp
                    <a href="<?php echo Url::current(['export'=>'excel']);?>">导出Excel</a>&nbsp&nbsp
            </td>
        </tr>
    <?php }?>
    </tbody>
</table>


